package cn.silver.module.system.enums;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author zhouxiaobo
 */
@Getter
@AllArgsConstructor
public enum UserStatusEnums {
    /**
     * 正常
     */
    NORMAL("00", "已开通", ""),
    GRANT("01", "开通中", "00"),
    EXTEND("02", "延期中", "00"),
    CLOSE("03", "注销中", "01"),
    CLOSED("04", "已注销", "01"),
    BLOCK("10", "已禁用", "01");

    private final String code;
    private final String name;
    private final String group;

    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code, item.group));
    }
}
